<?php # Статус корзины

class store_basket extends Load_use
{
	function getBlock()
	{
	
		$basket_id = getBasketId();
		$count = getCountProduct( $basket_id );
		$total_costs = getTotalCosts( $basket_id );
		
	
		return '<div class="user-panel__item your-shopping-cart floating">		
				<div class="user-panel__item__inner'.( $count['products'] ? '' : ' hide' ).'">
					<div class="user-panel__item__icon">
						<span>&nbsp;</span>
					</div>
					<div class="user-panel__item__link">
						<a href="#">Ваша корзина</a>
						<small><span class="count_product_basket">'.$count['products'].'</span> товара - 
						<span class="total_price_basket">'.getPriceFormat( $total_costs['total'] ).'</span> руб</small>
					</div>	
				</div>
			</div>';
			
			
			
			
/* 		$count = $total_cost = 0;
		
		if( $basket_id = getBasketId() ) {
			$counts = getCountProduct( $basket_id );
			$count = $counts['products'];
			$total_costs = getTotalCosts( $basket_id );
			$total_cost = getPriceFormat( $total_costs['total'] );
		}
				
		return '<div class="user-panel__item__inner">
					<div class="user-panel__item__icon">
						<span>&nbsp;</span>
					</div>
					<div class="user-panel__item__link">
						<a href="#">Ваша корзина</a>
						<small><span class="count_product_basket">'.$count.'</span> товара - 
						<span class="total_price_basket">'.$total_cost.'</span> руб</small>
					</div>	
				</div>'; */
	}
}